<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    Person.prototype.name = '11'
    function Person() {
      // var this = {
      //   __proto__: '11'
      // }
      // return this
    }
    var person = new Person()
    console.log(person.__proto__)   //{} 是由 Person（）创建的

    var obj = {
      name: 'wn'
    }
    // console.log(person.__proto__)    //{ name: '11' }
    person.__proto__ = obj
    console.log(person.name)
  </script>
  <script>
    //注意
    Person.prototype.name = 'jiajun'
    function Person() {

    }
    var person = new Person()
    Person.prototype = {
      name: 'sshuai'
    }
  </script>
</body>
</html>